<?php


namespace app\zhongcan\validate;


use think\Validate;
class NavValidate extends Validate
{
    //定义验证规则
    protected  $rule=[
        'title'=>'require',
    ];
    //定义验证失败时的提示信息
    protected $message = [
        'title.require'=>'标题不能为空',
        // ......
    ];
    //验证场景
    protected $scene=[
        'add'=>['title',],
        'edit'=>['id','title',],
    ];
}